import 'package:json_annotation/json_annotation.dart';

import '../../../m_chatroom/src/input/item_style.dart';
part 'show_item.g.dart';

@JsonSerializable()
class ShowItem {
  ItemStyle? style;
  String? text;
  String? url;
  String? color;
  int? size;
  String? extra;
  int? weight;

  // ShowItem();

  // 添加带参数的构造函数
  ShowItem({
    this.style,
    this.text,
    this.url,
    this.color,
    this.size,
    this.extra,
    this.weight,
  });

  factory ShowItem.fromJson(Map<String, dynamic> json) =>
      _$ShowItemFromJson(json);
  Map<String, dynamic> toJson() => _$ShowItemToJson(this);
}

@JsonSerializable()
class BoxItem {
  int? id;
  String? icon;
  String? name;
  String? background;

  BoxItem();
  factory BoxItem.fromJson(Map<String, dynamic> json) =>
      _$BoxItemFromJson(json);
  Map<String, dynamic> toJson() => _$BoxItemToJson(this);
}
